package br.mikhas.container.factory;

import br.mikhas.util.Assert;

public abstract class AbstractScope implements Scope {

	protected String name;
	protected State state = State.Idle;

	public AbstractScope(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public String toString() {
		return this.getName();
	}

	@Override
	public State getState() {
		return this.state;
	}

	@Override
	public void setState(State state) {
		Assert.notNull(state);
		this.state = state;
	}
}
